package config;

public class config {
	public static void main(String args[]) {
		Firewall firewall = Firewall.getInstance();
		
		configFirewall(firewall);
		performingFirewall(firewall);
	}
	
	public static void configFirewall(Firewall firewall) {
		firewall.agregarRegla(new Bloquear()
				.withCriterio(new PorIPOrigen(new IP(25,78,67,67)))
				.withAccion(new Loguear()));
					firewall.agregarRegla(new Habilitar()
				.withCriterio(new PorRangoIPOrigen(new IP(10,0,0,1)
								 ,new IP(20,0,0,1)))
				);
					firewall.agregarRegla(new Bloquear()
				.withCriterio(new PorIPDestino(new IP(63,78,23,45)))
				.withCriterio(new PorPuerto(new Puerto(80)))
				.withAccion(new Informar()));
					firewall.agregarRegla(new Redirigir(new IP(12,3,4,5))
				.withCriterio(new PorPuerto(new Puerto(2123)))
				.withAccion(new Loguear()));
	}
	
	public static void performingFirewall(Firewall firewall) {
		//probar el firewall mandando algun paquete
	}
}
